package com.zoshine.zzg.pojo.pojostatus;

import java.util.Objects;

/**
 * 供应商结算状态枚举
 *
 * @author 贾俊峰
 * @time 2017/6/20 17:42
 */
public enum SettlementStatus {
    PENDING_RECEIVE(0, "待提交审核"),
    AUDITING(1,"待审核"),
    AUDITED(10, "待申请发票"),
    INVOICE_DELIVER(20, "待寄送发票"),
    INVOICE(30, "待收取发票"),
    PRESENTING_BANK (40, "待转账"),
    AUDITED_FAILURE(90,"审核失败"),
    ;
    private int value;
    private String desc;
    SettlementStatus(final int value, final String desc) {
        this.value = value;
        this.desc = desc;
    }

    public int getValue() {
        return value;
    }

    public static String getDesc(Integer value) {
        for (SettlementStatus menuStatus : SettlementStatus.values()) {
            if (Objects.equals(menuStatus.value, value)) {
                return menuStatus.desc;
            }
        }
        return null;
    }
}
